package com.lb.jwitter;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import org.hibernate.annotations.ForeignKey;

@Entity
@Table (name="tbl_QLDTTXA_DM_DiemDat")
public class Tbl_QLDTTXA_DM_DiemDat implements Serializable {
   private static final long serialVersionUID = -1989579066723007050L;

   private Long id;
   private String ten;
   private Double diemDat;
   private Boolean suDung;
   private Date ngayApDung;
   private Tbl_QLDTTXA_ThongBaoTuyenSinh thongBaoId = null;
   private Tbl_QLDTTXA_DM_Khoa khoaId = null;

   @Id
   @GeneratedValue
   public Long getId() {
	    return id;
   }
   public void setId(Long id) {
	    this.id= id;
   }

   public String getTen() {
   	return ten;
   }
   public void setTen(String ten) {
   	this.ten= ten;
   }

   public Double getDiemDat() {
   	return diemDat;
   }
   public void setDiemDat(Double diemDat) {
   	this.diemDat= diemDat;
   }

   public Boolean getSuDung() {
   	return suDung;
   }
   public void setSuDung(Boolean suDung) {
   	this.suDung= suDung;
   }

   public Date getNgayApDung() {
   	return ngayApDung;
   }
   public void setNgayApDung(Date ngayApDung) {
   	this.ngayApDung= ngayApDung;
   }

   @ManyToOne(fetch=FetchType.EAGER)
   @JoinColumn(name="thongBaoId")
   @ForeignKey(name="FK_tbl_QLDTTXA_ThongBaoTuyenSinh_tbl_QLDTTXA_DM_DiemDat")
   public Tbl_QLDTTXA_ThongBaoTuyenSinh getThongBaoId() {
	    return thongBaoId;
   }
   public void setThongBaoId(Tbl_QLDTTXA_ThongBaoTuyenSinh thongBaoId) {
	    this.thongBaoId=thongBaoId;
   }

   @ManyToOne(fetch=FetchType.EAGER)
   @JoinColumn(name="khoaId")
   @ForeignKey(name="FK_tbl_QLDTTXA_DM_Khoa_tbl_QLDTTXA_DM_DiemDat")
   public Tbl_QLDTTXA_DM_Khoa getKhoaId() {
	    return khoaId;
   }
   public void setKhoaId(Tbl_QLDTTXA_DM_Khoa khoaId) {
	    this.khoaId=khoaId;
   }
}//endClass 

